package com.forezp.web;

import com.forezp.engin.executor.DefaultExecutor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.script.ScriptException;
import java.io.IOException;

/**
 * springboot-jdbc-TaskEnginController
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/3/16 18:33
 */
@RestController
public class TaskEnginController {

    @Autowired
    private DefaultExecutor defaultExecutor;

    @RequestMapping("/request")
    public Object test(Integer taskId) throws NoSuchMethodException, ScriptException, IOException {
        return defaultExecutor.execute(taskId);
    }

}
